arm/mm: release grant lock on xenmem_add_to_physmap_one() error paths
authorJan Beulich <jbeulich@suse.com>
Wed, 23 Aug 2017 15:45:45 +0000 (17:45 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 23 Aug 2017 15:45:45 +0000 (17:45 +0200)
commit59546c1897a90fe9af5ebbbb05ead8d98b4d17b9
tree6bf8f5a2f5bc372b7e7d5893da8a735009f1fdab
parent4a0485c3d343e1c582fa824e4896b9b613a14efe
arm/mm: release grant lock on xenmem_add_to_physmap_one() error paths

Commit 55021ff9ab ("xen/arm: add_to_physmap_one: Avoid to map mfn 0 if
an error occurs") introduced error paths not releasing the grant table
lock. Replace them by a suitable check after the lock was dropped.

This is XSA-235.

Reported-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/mm.c